A flash device is a nonvolatile storage array with a long lifetime, and data stored in the flash device is not lost even in the case of a power outage. Due to its nonvolatile storage feature and high-speed reading/writing performance, the flash device is widely applied in recent years.
In an application, a minimum storage unit of the flash device is a storage unit, and data is stored in an electron form in the storage unit. In addition, different data is represented as different threshold voltages Vth in the storage unit. For example, in a storage array of a single-level storage unit (SLC) type, each storage unit stores one bit of data, and stored data is 0 or 1. As shown in FIG. 1, when the storage unit stores data of 1, probability distribution of Vth is shown in a left pattern in FIG. 1, and when the storage unit stores data of 0, probability distribution of Vth is shown in a right pattern in FIG. 1. In other approaches, a controller of the flash device usually reads data stored in the storage unit in the following manner. A threshold voltage Vth of the storage unit is first obtained, and then a preset decision voltage Vread is compared with the threshold voltage Vth of the storage unit. When the decision voltage Vread is greater than a threshold voltage Vth of a storage unit, the data stored in the storage unit is “1”, and when the decision voltage Vread is less than a threshold voltage Vth of the storage unit, the data stored in the storage unit is “0”.
However, in an application, electrons in the storage unit leak as time passes and a threshold voltage of the storage unit whose electrons leak is shifted along a low level direction. In this case, in the foregoing method, for the storage unit that stores the data of 0, when the threshold voltage Vth of the storage unit is shifted to a voltage less than a preset decision voltage Vread, incorrect determining of the data stored in the storage unit is caused. For example, referring to FIG. 1 again, data stored in the storage unit is 0, and initial Vth of the storage unit is 5 volts (V). After a period of time, because electrons of the storage unit leak, the threshold voltage Vth of the storage unit is changed to 2 V, a preset decision voltage Vread is 3 V. In this case, if the foregoing method is used, because the decision voltage Vread (3 V) is greater than the threshold voltage Vth (2 V), the controller of the flash device incorrectly determines, as 1, the data stored in the storage unit.